1. Technical Field
The embodiments of the present disclosure relate to data accessing technology, and particularly to a server and a method for testing inter-integrated circuit (I2C) devices.
2. Description of Related Art
I2C devices, such as temperature sensors and memory devices, may be directly connected to different bus segments of an I2C bus that connects with a baseboard management controller (BMC) of a server. In this situation, each I2C device is assigned a unique bus address.
However, the I2C bus has limited address resources. Therefore, in order to connect more I2C devices, a switch (such as a multiplexer) may be used to connect more than one I2C device to the same bus segment of the I2C bus. In such a situation, the more than one I2C device share the same bus address but have different channels with the BMC, and so cannot be accessed at the same time. For reading data from a designated I2C device, only the channel of the designated I2C is opened via the switch while all other channels are closed. If two or more programs need to access different I2C devices connected to the switch, conflicts may occur. For example, the BMC may use a monitor program to periodically read data from each I2C device, and a test program may be used to read data from an I2C device to be tested. If the objects accessed by the two programs are different, either program may read undesired data.